package com.yonyou.iuap.jxzy.dao;
import com.yonyou.iuap.jxzy.entity.AcceptancePaper;
import com.yonyou.iuap.baseservice.persistence.mybatis.mapper.GenericExMapper;
import com.yonyou.iuap.baseservice.persistence.mybatis.mapper.GenericMapper;
import com.yonyou.iuap.mvc.type.SearchParams;
import com.yonyou.iuap.mybatis.anotation.MyBatisRepository;
import com.yonyou.iuap.mybatis.type.PageResult;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.ibatis.annotations.Param;
import org.hibernate.annotations.Parent;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;


@MyBatisRepository
public interface AcceptancePaperMapper extends GenericExMapper<AcceptancePaper> {
        List selectListByExcelData(List list);

        PageResult<AcceptancePaper> selectAllByPage(
				@Param("page") PageRequest paramPageRequest,@Param("condition") SearchParams paramSearchParams);
        
		List<AcceptancePaper> findByTime(@Param(value="startTime")String startTime,@Param(value="endTime") String endTime,
				@Param(value="usrcode")String usrcode,@Param(value="serialNo")String serialNo);

		Integer saveParam(AcceptancePaper acceptancePaper);

		Integer mergeSerialUnit(AcceptancePaper acceptancePaper);
		
		List<AcceptancePaper> getChildListById(@Param(value="searchMap")Map<String, Object> map);

		PageResult<AcceptancePaper> getChildListById2(
				@Param("condition") SearchParams paramSearchParams,@Param("page") PageRequest paramPageRequest);

		List<String> getQualityGrade(@Param(value="pk_org")String pk_org);

		//根据质量等级和物料品种获取单价
		Map<String, Object> getUnit(@Param(value="materialVariety")String materialVariety,@Param(value="qualityGrade") String qualityGrade);
		
		//,@Param(value="userName")String userName
		Integer booleanCheck(@Param(value="id")String id,@Param(value="modifierReason")String modifierReason,@Param(value="userName")String userName);

		PageResult<AcceptancePaper> selectAllByList(@Param("page") PageRequest paramPageRequest,@Param("condition") SearchParams paramSearchParams);

		PageResult<AcceptancePaper> selectAllByListByIds(
				@Param("condition") SearchParams paramSearchParams,@Param("page") PageRequest paramPageRequest,@Param(value="serialNo")List<String> serialNo);

		List<AcceptancePaper> getByFirst(@Param(value="serialNo")String serialNo);

	 public	List<String> getIsFirst(@Param(value="serialNo")String serialNo);

	 /** 平均含水分比 平均含杂质比 */
	AcceptancePaper getParamForSerialNo(@Param(value="serialNo")String serialNo);

	/**更新国内废纸验收表 */
	Integer updateParam(AcceptancePaper acceptancePaper);

	void delteById(@Param(value="id")String id);

	String getForkliftNo(@Param(value="serialNo")String serialNo);
}

